using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SilkSharp
{
	/*
	 * Definitions For Fix pitch estimator.
	 *
	 * @author Jing Dai
	 * @author Dingxin Xu
	 */
	public class Silk_common_pitch_est_defines
	{
		public const int PITCH_EST_MAX_FS_KHZ = 24; /* Maximum sampling frequency used */

		public const int PITCH_EST_FRAME_LENGTH_MS = 40; /* 40 ms */

		public const int PITCH_EST_MAX_FRAME_LENGTH = ( PITCH_EST_FRAME_LENGTH_MS * PITCH_EST_MAX_FS_KHZ );
		public const int PITCH_EST_MAX_FRAME_LENGTH_ST_1 = ( PITCH_EST_MAX_FRAME_LENGTH >> 2 );
		public const int PITCH_EST_MAX_FRAME_LENGTH_ST_2 = ( PITCH_EST_MAX_FRAME_LENGTH >> 1 );
		//TODO: PITCH_EST_SUB_FRAME is neither defined nor used, temporally ignore it;
		//	public const int PITCH_EST_MAX_SF_FRAME_LENGTH =      (PITCH_EST_SUB_FRAME * PITCH_EST_MAX_FS_KHZ);

		public const int PITCH_EST_MAX_LAG_MS = 18;           /* 18 ms -> 56 Hz */
		public const int PITCH_EST_MIN_LAG_MS = 2;            /* 2 ms -> 500 Hz */
		public const int PITCH_EST_MAX_LAG = ( PITCH_EST_MAX_LAG_MS * PITCH_EST_MAX_FS_KHZ );
		public const int PITCH_EST_MIN_LAG = ( PITCH_EST_MIN_LAG_MS * PITCH_EST_MAX_FS_KHZ );

		public const int PITCH_EST_NB_SUBFR = 4;

		public const int PITCH_EST_D_SRCH_LENGTH = 24;

		public const int PITCH_EST_MAX_DECIMATE_STATE_LENGTH = 7;

		public const int PITCH_EST_NB_STAGE3_LAGS = 5;

		public const int PITCH_EST_NB_CBKS_STAGE2 = 3;
		public const int PITCH_EST_NB_CBKS_STAGE2_EXT = 11;

		public const int PITCH_EST_CB_mn2 = 1;
		public const int PITCH_EST_CB_mx2 = 2;

		public const int PITCH_EST_NB_CBKS_STAGE3_MAX = 34;
		public const int PITCH_EST_NB_CBKS_STAGE3_MID = 24;
		public const int PITCH_EST_NB_CBKS_STAGE3_MIN = 16;
	}
}
